import naive_bayes
import apriori
import kmeans

def main():
    print("机器学习作业4 - 三种算法实现")
    print("=" * 60)
    
    # 运行朴素贝叶斯
    nb_accuracy = naive_bayes.run_naive_bayes()
    
    print("\n" + "=" * 60)
    
    # 运行Apriori
    n_itemsets, n_rules = apriori.run_apriori()
    
    print("\n" + "=" * 60)
    
    # 运行K-means
    kmeans_ari = kmeans.run_kmeans()
    
    print("\n" + "=" * 60)
    print("实验总结:")
    print(f"朴素贝叶斯准确率: {nb_accuracy:.4f}")
    print(f"Apriori发现频繁项集数量: {n_itemsets}")
    print(f"Apriori生成关联规则数量: {n_rules}")
    print(f"K-means调整兰德指数: {kmeans_ari:.4f}")

if __name__ == "__main__":
    main()